#include <stdio.h>  
int main(int argc, char **argv) {  
    int h;  
    if (scanf("%d", &h));  
  
    for (int i = 0; i < h; i++) {  
        for (int j = h - 1; j > i; j--)  
            printf("  ");  
        int j = h;  
        for (; j >= h - i; j--) {  
            if (j > 9)  
                printf("%d", h - j + 1);  
            else  
                printf("%2d", h - j + 1);  
        }  
        for (j += 2; j <= h; j++) {  
            if (j > 9)  
                printf("%d", h - j + 1);  
            else  
                printf("%2d", h - j + 1);  
        }  
        putchar('\n');  
    }  
    return 0;  
} 